<template>
  <div class="short-player">
    <div class="play-wrapper">
      <video controls :src="item.video.url"></video>
      <div class="info-wrapper">
        <div class="title">{{ item.title }}</div>
      </div>
      <div class="right-wrapper">
        <div>
          <img :src="item.user.avatarurl" alt="" class="header-pic" />
          <div class="icon-btn">
            <img src="../assets/img/small-video/video-likes.png" />
          </div>
          <div class="text">{{ item.upCount }}</div>
          <div class="icon-btn">
            <img src="../assets/img/small-video/video-comment.png" />
          </div>
          <div class="text">评论</div>
          <div class="icon-btn">
            <img src="../assets/img/small-video/video-share.png" />
          </div>
          <div class="text">分享</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      item: this.$route.query.data,
    };
  },
};
</script>

<style lang="less" scoped>
.short-player {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #eee;
  .play-wrapper {
    width: 100%;
    height: 100%;
    background: transparent;
    left: 0;
    top: 0;
    z-index: 10;
    video {
      width: 100%;
      background-color: #000;
      height: 100%;
    }
    .info-wrapper {
      color: #fff;
      letter-spacing: 0;
      line-height: 24px;
      width: 282px;
      position: absolute;
      bottom: 71px;
      left: 15px;
      .title {
        font-family: PingFangSC-Medium;
        font-size: 19px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-bottom: 10px;
      }
    }
    .right-wrapper {
      position: absolute;
      right: 15px;
      bottom: 58px;
      width: 48px;
      z-index: 100;

      div {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        .header-pic {
          width: 48px;
          height: 48px;
          border-radius: 100%;
          margin-bottom: 26px;
        }
        .icon-btn {
          width: 48px;
          height: 48px;
          display: flex;
          justify-content: center;
          align-items: center;
          background: rgba(0, 0, 0, 0.42);
          border-radius: 100%;
          margin-bottom: 4px;
          justify-content: center;
          img {
            width: 21.5px;
            height: 21.5px;
          }
        }
        .text {
          margin-bottom: 14px;
          font-size: 14px;
          color: #fff;
          letter-spacing: 0;
          text-align: center;
        }
      }
    }
  }
}
</style>